from django.contrib import admin
from models import SimplePost, Post

class SimplePostAdmin(admin.ModelAdmin):
    def save_model(self, request, obj, form, change):
        obj.author = request.user
        obj.save()
admin.site.register(SimplePost, SimplePostAdmin)

class PostAdmin(SimplePostAdmin):
    list_display = ('title', 'author', 'slug')
admin.site.register(Post, PostAdmin)